﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

namespace GrayParrot.Web.Formly
{
    public class GrayParrotDateTimePickerOptionsAttribute : TemplateOptionsAttribute
    {
        [JsonProperty(PropertyName = "format", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public string Format { get; set; }
        [JsonProperty(PropertyName = "initDate", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public DateTime? InitialDate { get; set; }
        [JsonProperty(PropertyName = "showMeridian", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public bool ShowMeridian { get; set; }
        [JsonProperty(PropertyName = "autoclose", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public bool Autoclose { get; set; }
        [JsonProperty(PropertyName = "todayBtn", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public bool TodayButton { get; set; }
        [JsonProperty(PropertyName = "todayHighlight", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public bool TodayHighlight { get; set; }
        [JsonProperty(PropertyName = "language", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public string Language { get; set; }
        [JsonProperty(PropertyName = "minuteStep", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public short MinuteStep { get; set; }
        [JsonProperty(PropertyName = "showTimePanel", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public bool ShowTimePanel { get; set; }
        [JsonProperty(PropertyName = "withInitialDate", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public bool WithInitialDate { get; set; }

        public GrayParrotDateTimePickerOptionsAttribute()
        {
            this.Format = "dd MM yyyy - HH:ii p";
            this.ShowMeridian = false;
            this.InitialDate = DateTime.Now;
            this.Autoclose = true;
            this.TodayButton = true;
            this.TodayHighlight = true;
            this.Language = "it";
            this.MinuteStep = 5;
            this.ShowTimePanel = true;
        }
    }
}
